package com.shengsiyuan.lesson7;

public class Environment {
	private Strategy strategy;
	public Environment(Strategy strategy){
		this.strategy = strategy;
	}
	/**
	 * @return the strategy
	 */
	public Strategy getStrategy() {
		return strategy;
	}
	/**
	 * @param strategy the strategy to set
	 */
	public void setStrategy(Strategy strategy) {
		this.strategy = strategy;
	}
	public int calculate(int a, int b){
		return strategy.calculate(a, b);
	}
	
}
